package com.ywfStudy.ywfliving.commodity.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ywfStudy.common.utils.PageUtils;
import com.ywfStudy.ywfliving.commodity.entity.CategoryEntity;
import com.ywfStudy.ywfliving.commodity.vo.Catalog2Vo;

import java.util.List;
import java.util.Map;

/**
 * 商品分类表
 *
 * @author ywf
 * @email 993530928@qq.com
 * @date 2023-04-02 15:22:23
 */
public interface CategoryService extends IService<CategoryEntity> {

    //返回所有分类及其子分类（带有层级关系-树形）
    List<CategoryEntity> listTree();
    PageUtils queryPage(Map<String, Object> params);

    //增加接口，返回cascadedCategoryId
    Long[] getCascadedCategoryId(Long categoryId);

    //获取一级分类
    List<CategoryEntity> getLevel1Categories();

    //返回二级分类包含三级分类的数据
    Map<String,List<Catalog2Vo>> getCatalogJson();
}

